//初始化APP 获取token 和appid
var appid = '';
var token = '';
//获取token，调用API服务
auth();

function auth() {
	$.ajax({
		type: 'get',
		async:false,
		url: "http://v2.mashupcloud.cn/developer/auth.do",
		data: {
			appkey: 'IwgITBdJsnUgJQwKWfjGxrDjmRDqnURh',
			appsecret: 'tnDXgDWoFOwvysUSdiMQAieAQfLCXxTn'
		},
		//dataType: "json",
		success: function(json) {
			var jo = eval(json);
			var token = jo[1];
			var appid = jo[2];
			sessionStorage.setItem("token", token);
			sessionStorage.setItem("appid", appid);
		},
		error: function(json) {
			console.log("err:" + json);
		}
	});
}